package com.xb.cloud.usercenter.service;

import com.xb.cloud.gateway.client.RtnInfo;

/**
 * 
 * @ClassName: PassportService
 * @Description:用户登录注册相关接口
 * @author: 鲜备科技
 * @date: 2017年12月25日 下午4:16:47
 * 
 * @Copyright: 2017 www.xianbeitech.com Inc. All rights reserved.
 *
 */
public interface PassportService {

	/**
	 * 用户使用密码登录
	 * 
	 * @Title loginWithPassword
	 * @param companyId
	 * @param phoneNum
	 * @param password
	 * @return
	 */
	RtnInfo loginWithPassword(long companyId, String phoneNum, String password);

	/**
	 * 用户使用短信验证码登录
	 * 
	 * @Title loginWithVerifyCode
	 * @param phoneNum
	 * @param verifyCode
	 * @return
	 */
	public RtnInfo loginWithVerifyCode(long companyId, String phoneNum, String verifyCode);

	/**
	 * 用户注册
	 * 
	 * @Title register
	 * @param companyId
	 * @param phoneNum
	 * @param verifyCode
	 * @param password
	 * @return
	 */
	RtnInfo register(long companyId, String phoneNum, String verifyCode, String password);

	/**
	 * 发送短信验证码
	 * 
	 * @Title sendSms
	 * @param phone
	 * @return
	 */
	public RtnInfo sendSms(long companyId, String phoneNum);

	/**
	 * 短信验证码检查是否有效
	 * 
	 * @Title checkVerifyCode
	 * @param phone
	 * @param code
	 * @return
	 */
	public RtnInfo checkVerifyCode(long companyId, String phoneNum, String code);

	/**
	 * 用户userToken过期后尝试使用autoUserToken自动登录
	 * 
	 * @Title autoUserTokenVerify
	 * @param autoUserToken
	 * @return
	 */
	public RtnInfo autoLogin(String autoUserToken);

	/**
	 * 用户手机短信重置密码
	 * 
	 * @Title resetPassword
	 * @param companyId
	 * @param phone
	 * @param passeord
	 * @return
	 */
	public RtnInfo resetPassword(long companyId, String phoneNum, String verifyCode, String password);

	/**
	 * 用户退出
	 * 
	 * @Title logout
	 * @param companyId
	 * @param userToken
	 * @param autoUserToken
	 * @return
	 */
	public RtnInfo logout(String userToken, String autoUserToken);

}
